<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
    <!-- Loading Bootstrap -->
    <link href="/static/admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
    <!-- Loading Flat UI -->
    <link href="/static/admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
    <link href="/static/admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
    <link rel="shortcut icon" href="/static/admin/Flat/img/favicon.ico">
    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
    <!--[if lt IE 9]>
    <script src="dist/js/vendor/html5shiv.js"></script>
    <script src="dist/js/vendor/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<form action="/admin/user/{$userData.id}" method="post">
    <input type="hidden" name="_method" value="PUT">
    <div class="alert alert-success">编辑用户</div>
    <div class="form-group">
        <label for="username">用户名称</label>
        <input required id="username" class="form-control" type="text" placeholder="请输入用户名称" name="username"
               value="{$userData.username}">
    </div>
    <div class="form-group">
        <label for="password">输入密码(不修改留空)</label>
        <input id="password" class="form-control" type="text" placeholder="请输入输入密码" name="password">
    </div>
    <div class="form-group">
        <label for="password2">重复密码(不修改留空)</label>
        <input id="password2" class="form-control" type="text" placeholder="请重复输入密码" name="password2">
    </div>

    <div>
        <label>用户组</label>
        <br/>
        {volist name="authgroups" id="authgroup"}
        <label class="checkbox checkbox-inline">
            <input class="custom-checkbox" name="group_id[]" type="checkbox" data-toggle="checkbox"
                   value="{$authgroup.id}"
                   {if condition="in_array($authgroup['id'],$ownGroups)" }
                   checked
                   {/if}
            >
            <span class="icons">
                    <span class="icon-unchecked"></span>
                    <span class="icon-checked"></span>
                    </span>
            {$authgroup.title}
        </label>
        {/volist}
    </div>
    <button class="btn btn-primary btn-block" type="submit">确定</button>
</form>
</body>
</html>
